Filter Design Results 
Generated by:   http://www-users.cs.york.ac.uk/~fisher/mkfilter 

Summary 
You specified the following parameters: 
filtertype  =  Butterworth  
passtype  =  Highpass  
ripple  =   
order  =  6  
samplerate  =  1000  
corner1  =  0.5  
corner2  =   
adzero  =   
logmin  =   

Results 
Command line: /www/usr/fisher/helpers/mkfilter -Bu -Hp -o 6 -a 5.0000000000e-04 0.0000000000e+00
raw alpha1    =   0.0005000000
raw alpha2    =   0.0005000000
warped alpha1 =   0.0005000004
warped alpha2 =   0.0005000004
gain at dc    :   mag = 0.000000000e+00
gain at centre:   mag = 8.220360244e-01   phase =  -0.4964890002 pi
gain at hf    :   mag = 1.006087548e+00   phase =   0.0000000000 pi

S-plane zeros:
	  0.0000000000 + j   0.0000000000	6 times

S-plane poles:
	 -0.0008131047 + j  -0.0030345480
	 -0.0022214433 + j  -0.0022214433
	 -0.0030345480 + j  -0.0008131047
	 -0.0030345480 + j   0.0008131047
	 -0.0022214433 + j   0.0022214433
	 -0.0008131047 + j   0.0030345480

Z-plane zeros:
	  1.0000000000 + j   0.0000000000	6 times

Z-plane poles:
	  0.9991826271 + j  -0.0030320751
	  0.9977785622 + j  -0.0022165140
	  0.9969697202 + j  -0.0008106427
	  0.9969697202 + j   0.0008106427
	  0.9977785622 + j   0.0022165140
	  0.9991826271 + j   0.0030320751

Recurrence relation:
y[n] = (  1 * x[n- 6])
     + ( -6 * x[n- 5])
     + ( 15 * x[n- 4])
     + (-20 * x[n- 3])
     + ( 15 * x[n- 2])
     + ( -6 * x[n- 1])
     + (  1 * x[n- 0])

     + ( -0.9879351824 * y[n- 6])
     + (  5.9396028304 * y[n- 5])
     + (-14.8790592165 * y[n- 4])
     + ( 19.8789124906 * y[n- 3])
     + (-14.9393827411 * y[n- 2])
     + (  5.9878618191 * y[n- 1])


Ansi ``C'' Code 
/* Digital filter designed by mkfilter/mkshape/gencode   A.J. Fisher
   Command line: /www/usr/fisher/helpers/mkfilter -Bu -Hp -o 6 -a 5.0000000000e-04 0.0000000000e+00 -l */

#define NZEROS 6
#define NPOLES 6
#define GAIN   1.006087548e+00

static float xv[NZEROS+1], yv[NPOLES+1];

static void filterloop()
  { for (;;)
      { xv[0] = xv[1]; xv[1] = xv[2]; xv[2] = xv[3]; xv[3] = xv[4]; xv[4] = xv[5]; xv[5] = xv[6]; 
        xv[6] = next input value / GAIN;
        yv[0] = yv[1]; yv[1] = yv[2]; yv[2] = yv[3]; yv[3] = yv[4]; yv[4] = yv[5]; yv[5] = yv[6]; 
        yv[6] =   (xv[0] + xv[6]) - 6 * (xv[1] + xv[5]) + 15 * (xv[2] + xv[4])
                     - 20 * xv[3]
                     + ( -0.9879351824 * yv[0]) + (  5.9396028304 * yv[1])
                     + (-14.8790592170 * yv[2]) + ( 19.8789124910 * yv[3])
                     + (-14.9393827410 * yv[4]) + (  5.9878618191 * yv[5]);
        next output value = yv[6];
      }
  }


Download code and/or coefficients:     
Magnitude (red) and phase (blue) vs. frequency 
x axis: frequency, as a fraction of the sampling rate (i.e. 0.5 represents the Nyquist frequency, which is 500 Hz) 
y axis (red): magnitude (linear, normalized) 
y axis (blue): phase 
 

For an expanded view, enter frequency limits (as a fraction of the sampling rate) here: 

   Lower limit:  Upper limit:   

Impulse response 
x axis: time, in samples (i.e. 1000 represents 1 second) 
y axis (red): filter response (linear, normalized) 
 


Step response 
x axis: time, in samples (i.e. 1000 represents 1 second) 
y axis (red): filter response (linear, normalized) 
 

For a view on a different scale, enter upper time limit (integer number of samples) here: 

  Upper limit:   


--------------------------------------------------------------------------------

Tony Fisher fisher@minster.york.ac.uk 